package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.atguigu.tingshu.vo.user.UserPaidRecordVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface UserInfoService extends IService<UserInfo> {

    /**
     * 获取用户信息.
     * @param userId
     * @return
     */
    UserInfoVo getUserInfo(Long userId);

    /**
     * 获取用户已购买的专辑声音集合数据
     * @param userId
     * @param albumId
     * @param trackIdList
     * @return
     */
    Map<Long, Integer> userIsPaidTrack(Long userId, Long albumId, List<Long> trackIdList);

    /**
     * 判断用户是否购买过专辑
     * @param userId
     * @param albumId
     * @return
     */
    Boolean isPaidAlbum(Long userId, Long albumId);

    /**
     * 获取专辑已支付的声音Id集合列表
     * @param userId
     * @param albumId
     * @return
     */
    List<Long> findUserPaidTrackList(Long userId, Long albumId);

    /**
     * 保存用户购买信息
     * @param userPaidRecordVo
     */
    void updateUserPaidRecord(UserPaidRecordVo userPaidRecordVo);

    /**
     * 获取
     */
    void updateVipExpireStatus();

}
